<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-X-admin2.0</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
        <link rel="stylesheet" href="${request.contextPath}/css/font.css">
        <link rel="stylesheet" href="${request.contextPath}/css/xadmin.css">
        <link rel="stylesheet" href="${request.contextPath}/css/layui.css">
        <script type="text/javascript" src="${request.contextPath}/js/jquery.min.js"></script>
        <script type="text/javascript" src="${request.contextPath}/js/xadmin.js"></script>
        <script src="${request.contextPath}/js/layui.js" charset="utf-8"></script>
        <script src="${request.contextPath}/lib/layui/layui.js" charset="utf-8"></script>

    </head>
    <body>

    <br/>
    <br/>
    <br/>
    <br/>

    <div class="x-body layui-anim layui-anim-up">
    
        <div class="layui-row layui-col-space10">
             <div class="layui-col-md2">
             <div class="layui-select-title">
                  <div class="layui-input-inline">
                    <select name="modules" lay-verify="required" id="systemId" class="layui-input" onselect="${search.systemId!''}">
                      <option value="">所有系统</option>
                      <#list systemInfoList as systemInfo>
                          <option value="${systemInfo.id?c}">${systemInfo.enName}</option>
                      </#list>
                    </select>
                  </div>
                </div>
                </div>
             <div class="layui-col-md8">
                <input type="text" name="title" id="searchKey" lay-verify="title" autocomplete="off" placeholder="请输入接口名称或者接口所属类名，或者接口描述信息" value="${search.searchKey!''}" class="layui-input">

             </div>
             <div class="layui-col-md2">
                     <button class="layui-btn" onclick="redirect(1)" lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
              </div>
        </div>


        <br/>
        <br/>
        <br/>
        <br/>

        <#if pageBean??>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>所属系统</th>
                    <th>接口名称</th>
                    <th>url</th>
                    <th>接口描述</th>
                    <td>状态</td>
                    <th>录入时间</th>
                    <th>最后修改时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <#list pageBean.dataList as interfaceDetail>
                    <tr>
                        <td>${interfaceDetail.id?c}</td>
                        <td>${interfaceDetail.systemName}</td>
                        <td>${interfaceDetail.name}</td>
                        <td>${interfaceDetail.address!}</td>
                        <td>${interfaceDetail.description}</td>
                        <td>${interfaceDetail.status}</td>
                        <td>${(interfaceDetail.createTime?date)!}</td>
                        <td>${(interfaceDetail.updateTime?date)!}</td>
                        <td class="td-status">
                            <button class="layui-btn layui-btn-normal layui-btn-mini" onclick="javascript:redirectInterfaceDetail(${interfaceDetail.id?c});">查看明细</button>
                        </td>
                    </tr>
                </#list>
                </tbody>
            </table>
            <div class="page">

                <input type="hidden" id="pageSize" value="${pageBean.currentPage}">
                <input type="hidden" id="currentPage" value="${pageBean.currentPage}">
                <input type="hidden" id="preSystemId" value="${search.systemId}">


                <if>
                    <#if (pageBean.currentPage-10>0)>
                        <a class="prev" href="javascript:redirect(${pageBean.currentPage-10})">&lt;&lt;</a>
                    </#if>


                    <#if (pageBean.currentPage-1>0)>
                        <a class="num" href="javascript:redirect(${pageBean.currentPage-1})">${pageBean.currentPage-1}</a>
                    </#if>
                    <#if (pageBean.currentPage>0)>
                        <span class="current">${pageBean.currentPage}</span>
                    </#if>
                    <#if (pageBean.currentPage+1 <= pageBean.totalPage) >
                         <a class="num" href="javascript:redirect(${pageBean.currentPage+1})">${pageBean.currentPage+1}</a>
                    </#if>

                    <#if (pageBean.currentPage+10 <= pageBean.totalPage) >
                        <a class="next" href="javascript:redirect(${pageBean.currentPage+10})">&gt;&gt;</a>
                    </#if>
                </div>
            </div>
        </#if>




        
      <!-- <fieldset class="layui-elem-field">
          <legend>数据统计</legend>
          <div class="layui-field-box">
              <div class="layui-col-md12">
                  <div class="layui-card">
                      <div class="layui-card-body">
                          <div class="layui-carousel x-admin-carousel x-admin-backlog" lay-anim="" lay-indicator="inside" lay-arrow="none" style="width: 100%; height: 90px;">
                              <div carousel-item="">
                                  <ul class="layui-row layui-col-space10 layui-this">
                                      <li class="layui-col-xs5">
                                          <a href="javascript:;" class="x-admin-backlog-body">
                                              <h3>接入系统总数</h3>
                                              <p>
                                                  <cite>66</cite></p>
                                          </a>
                                      </li>
                                      <li class="layui-col-xs5">
                                          <a href="javascript:;" class="x-admin-backlog-body">
                                              <h3>接口总数</h3>
                                              <p>
                                                  <cite>12</cite></p>
                                          </a>
                                      </li>
                                     &lt;!&ndash;  <li class="layui-col-xs2">
                                          <a href="javascript:;" class="x-admin-backlog-body">
                                              <h3>回复数</h3>
                                              <p>
                                                  <cite>99</cite></p>
                                          </a>
                                      </li>
                                      <li class="layui-col-xs2">
                                          <a href="javascript:;" class="x-admin-backlog-body">
                                              <h3>商品数</h3>
                                              <p>
                                                  <cite>67</cite></p>
                                          </a>
                                      </li>
                                      <li class="layui-col-xs2">
                                          <a href="javascript:;" class="x-admin-backlog-body">
                                              <h3>文章数</h3>
                                              <p>
                                                  <cite>67</cite></p>
                                          </a>
                                      </li>
                                      <li class="layui-col-xs2">
                                          <a href="javascript:;" class="x-admin-backlog-body">
                                              <h3>文章数</h3>
                                              <p>
                                                  <cite>6766</cite></p>
                                          </a>
                                      </li> &ndash;&gt;
                                  </ul>
                              </div>
                          </div>
                      </div>
                  </div>
              </div>
          </div>
      </fieldset>-->
        <fieldset class="layui-elem-field">
            <legend>开发团队</legend>
            <div class="layui-field-box">
                <table class="layui-table">
                    <tbody>
                        <tr>
                            <th>开发者(发起人)</th>
                            <td>张博(473816910@qq.com)</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </fieldset>
    </div>
     


    </body>

    <script>
        $(function  () {


            layui.use('form', function(){
                var form = layui.form;
                var preSystemId=$("#preSystemId").val();
                $("#systemId").find("option[value='"+preSystemId+"']").prop("selected",true);
                form.render();
            });
        })


    </script>


    <script type="text/javascript">

        $(document).ready(function(){
            var key=$("#preSystemId").val();
            //根据值让option选中
            $("#refundReason option[value='"+key+"']").attr("selected","selected");
        });


        function redirect(currentPage){
            var systemId=$("#systemId").val();
            var searchKey=$("#searchKey").val();
            var currentPage=currentPage;

            var pageSize=10;
            if(systemId ==''){
                layer.msg('请先选择系统，再查询', function(){
                });
                return;
            }
            window.location.href="${request.contextPath}"+"/itapm/go_search.htm?systemId="+systemId+"&currentPage="+currentPage+"&pageSize="+pageSize+"&searchKey="+encodeURI(searchKey);
        }


        function redirectInterfaceDetail(interfaceDetailId){
            window.open("${request.contextPath}"+"/itapm/go_interface_detail.htm?interfaceDetailId="+interfaceDetailId);
        }
    </script>
</html>